build: always include headers
This commit is contained in:
committed by
Chris Rizzitello
parent
a92f5b0351
commit
4f8ae57ffd
@ -33,13 +33,6 @@ macro(configure_definitions)
|
||||
cmake_policy(SET CMP0005 NEW)
|
||||
endif()
|
||||
|
||||
# TODO: explain why we're adding headers to sources.
|
||||
if(${CMAKE_GENERATOR} STREQUAL "Unix Makefiles")
|
||||
set(ADD_HEADERS_TO_SOURCES FALSE)
|
||||
else()
|
||||
set(ADD_HEADERS_TO_SOURCES TRUE)
|
||||
endif()
|
||||
|
||||
set(BIN_TEMP_DIR ${PROJECT_BINARY_DIR}/temp/bin)
|
||||
|
||||
endmacro()
|
||||
|
||||
@ -28,14 +28,10 @@ if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
|
||||
list(APPEND sources ${mac_sources})
|
||||
endif()
|
||||
|
||||
if(ADD_HEADERS_TO_SOURCES)
|
||||
list(APPEND sources ${headers})
|
||||
endif()
|
||||
|
||||
# generated includes
|
||||
include_directories(${PROJECT_BINARY_DIR}/config)
|
||||
|
||||
add_library(${target} STATIC ${sources})
|
||||
add_library(${target} STATIC ${sources} ${headers})
|
||||
|
||||
target_link_libraries(
|
||||
${target}
|
||||
|
||||
@ -16,5 +16,5 @@
|
||||
|
||||
config_test()
|
||||
set(target ${INTEG_TESTS_BIN})
|
||||
add_executable(${target} ${sources})
|
||||
add_executable(${target} ${sources} ${headers})
|
||||
target_link_libraries(${target} ${test_libs})
|
||||
|
||||
@ -16,5 +16,5 @@
|
||||
|
||||
config_test()
|
||||
set(target ${UNIT_TESTS_BIN})
|
||||
add_executable(${target} ${sources})
|
||||
add_executable(${target} ${sources} ${headers})
|
||||
target_link_libraries(${target} ${test_libs})
|
||||
|
||||
Reference in New Issue
Block a user