Skip to content
Snippets Groups Projects
Commit 548cd0e6 authored by Ben Cumming's avatar Ben Cumming Committed by GitHub
Browse files

Merge pull request #6 from bcumming/cleanup

fixed modcc->hpp dependencies
parents af6d8b5c 15585340
No related branches found
No related tags found
No related merge requests found
...@@ -87,7 +87,6 @@ else() ...@@ -87,7 +87,6 @@ else()
set(modcc "${MODCC_BIN}") set(modcc "${MODCC_BIN}")
set(use_external_modcc ON BOOL) set(use_external_modcc ON BOOL)
endif() endif()
message("==== modcc: " ${modcc})
include_directories(${CMAKE_SOURCE_DIR}/tclap/include) include_directories(${CMAKE_SOURCE_DIR}/tclap/include)
include_directories(${CMAKE_SOURCE_DIR}/vector) include_directories(${CMAKE_SOURCE_DIR}/vector)
...@@ -99,8 +98,10 @@ if( "${WITH_TBB}" STREQUAL "ON" ) ...@@ -99,8 +98,10 @@ if( "${WITH_TBB}" STREQUAL "ON" )
include_directories(${TBB_INCLUDE_DIRS}) include_directories(${TBB_INCLUDE_DIRS})
endif() endif()
# TODO : only compile modcc if it is not provided externally # only compile modcc if it is not provided externally
add_subdirectory(modcc) if(use_external_modcc)
add_subdirectory(modcc)
endif()
add_subdirectory(mechanisms) add_subdirectory(mechanisms)
add_subdirectory(src) add_subdirectory(src)
add_subdirectory(tests) add_subdirectory(tests)
......
...@@ -21,7 +21,7 @@ foreach(mech ${mechanisms}) ...@@ -21,7 +21,7 @@ foreach(mech ${mechanisms})
else() else()
add_custom_command( add_custom_command(
OUTPUT "${hpp}" OUTPUT "${hpp}"
DEPENDS modparser "${mod}" DEPENDS "${mod}"
WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}" WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
COMMAND ${modcc} ${modcc_flags} ${mod} -o ${hpp} COMMAND ${modcc} ${modcc_flags} ${mod} -o ${hpp}
) )
...@@ -31,5 +31,5 @@ foreach(mech ${mechanisms}) ...@@ -31,5 +31,5 @@ foreach(mech ${mechanisms})
endforeach() endforeach()
# Fake target to always trigger .mod -> .hpp dependencies because wtf CMake # 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