Skip to content
Snippets Groups Projects
Commit f01045ea authored by Gilles Khouzam's avatar Gilles Khouzam Committed by Brad King
Browse files

Tests: Make Preprocess test work in RelWithDebInfo and MinSizeRel

parent b8db2ed7
No related branches found
No related tags found
No related merge requests found
......@@ -214,18 +214,24 @@ set(FILE_PATH "${Preprocess_SOURCE_DIR}/file_def.h")
set(TARGET_PATH "${Preprocess_SOURCE_DIR}/target_def.h")
# Set some definition properties.
foreach(c "" "_DEBUG" "_RELEASE")
foreach(c "" "_DEBUG" "_RELEASE" "_RELWITHDEBINFO" "_MINSIZEREL")
set(FLAVOR "${c}")
# Treat RelWithDebInfo and MinSizeRel as Release to avoid having
# an exponentional matrix of inclusions and exclusions of defines
if("${c}" STREQUAL "_RELWITHDEBINFO" OR "${c}" STREQUAL "_MINSIZEREL")
set(FLAVOR "_RELEASE")
endif()
set_property(
DIRECTORY .
APPEND PROPERTY COMPILE_DEFINITIONS${c} "DIRECTORY_DEF${c}"
APPEND PROPERTY COMPILE_DEFINITIONS${c} "DIRECTORY_DEF${FLAVOR}"
)
set_property(
TARGET Preprocess
PROPERTY COMPILE_DEFINITIONS${c} "TARGET_DEF${c}"
PROPERTY COMPILE_DEFINITIONS${c} "TARGET_DEF${FLAVOR}"
)
set_property(
SOURCE preprocess.c preprocess.cxx
PROPERTY COMPILE_DEFINITIONS${c} "FILE_DEF${c}"
PROPERTY COMPILE_DEFINITIONS${c} "FILE_DEF${FLAVOR}"
)
endforeach()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment