Skip to content
Snippets Groups Projects
Commit 15585340 authored by Benjamin Cumming's avatar Benjamin Cumming
Browse files

fixed modcc->hpp dependencies

parent 6d7695ba
No related branches found
No related tags found
No related merge requests found
......@@ -87,7 +87,6 @@ else()
set(modcc "${MODCC_BIN}")
set(use_external_modcc ON BOOL)
endif()
message("==== modcc: " ${modcc})
include_directories(${CMAKE_SOURCE_DIR}/tclap/include)
include_directories(${CMAKE_SOURCE_DIR}/vector)
......@@ -99,8 +98,10 @@ if( "${WITH_TBB}" STREQUAL "ON" )
include_directories(${TBB_INCLUDE_DIRS})
endif()
# TODO : only compile modcc if it is not provided externally
add_subdirectory(modcc)
# only compile modcc if it is not provided externally
if(use_external_modcc)
add_subdirectory(modcc)
endif()
add_subdirectory(mechanisms)
add_subdirectory(src)
add_subdirectory(tests)
......
......@@ -21,7 +21,7 @@ foreach(mech ${mechanisms})
else()
add_custom_command(
OUTPUT "${hpp}"
DEPENDS modparser "${mod}"
DEPENDS "${mod}"
WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
COMMAND ${modcc} ${modcc_flags} ${mod} -o ${hpp}
)
......@@ -31,5 +31,5 @@ foreach(mech ${mechanisms})
endforeach()
# Fake target to always trigger .mod -> .hpp dependencies because wtf CMake
add_custom_target(build_all_mods DEPENDS ${all_mod_hpps})
add_custom_target(build_all_mods DEPENDS ${all_mod_hpps} modcc)
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment