File tree Expand file tree Collapse file tree 3 files changed +7
-10
lines changed Expand file tree Collapse file tree 3 files changed +7
-10
lines changed Original file line number Diff line number Diff line change @@ -50,6 +50,13 @@ if(CMAKE_BUILD_TYPE STREQUAL "Ubsan")
50
50
add_compile_options ($< $< COMPILE_LANGUAGE:C> :-fsanitize=undefined> )
51
51
endif ()
52
52
53
+ # Check integrity of node structure when compiled as debug
54
+ add_compile_definitions ($< $< CONFIG:Debug> :CMARK_DEBUG_NODES> )
55
+ # FIXME(compnerd) why do we not use `!defined(NDEBUG)`?
56
+ add_compile_definitions ($< $< CONFIG:Debug> :DEBUG> )
57
+
58
+ add_compile_options ($< $< AND:$< CONFIG:PROFILE> ,$< COMPILE_LANGUAGE:C> > :-pg> )
59
+
53
60
if ("${CMAKE_SOURCE_DIR} " STREQUAL "${CMAKE_BINARY_DIR} " )
54
61
message (FATAL_ERROR "Do not build in-source.\n Please remove CMakeCache.txt and the CMakeFiles/ directory.\n Then: mkdir build ; cd build ; cmake .. ; make" )
55
62
endif ()
Original file line number Diff line number Diff line change @@ -19,9 +19,6 @@ include_directories(
19
19
20
20
include_directories (include ${CMAKE_CURRENT_BINARY_DIR} )
21
21
22
- set (CMAKE_C_FLAGS_PROFILE "${CMAKE_C_FLAGS_RELEASE} -pg" )
23
- set (CMAKE_LINKER_PROFILE "${CMAKE_LINKER_FLAGS_RELEASE} -pg" )
24
-
25
22
if (CMARK_SHARED )
26
23
add_library (${LIBRARY} SHARED ${LIBRARY_SOURCES} )
27
24
Original file line number Diff line number Diff line change @@ -55,13 +55,6 @@ elseif(CMARK_STATIC)
55
55
target_link_libraries (${PROGRAM} libcmark-gfm-extensions_static libcmark-gfm_static )
56
56
endif ()
57
57
58
- # Check integrity of node structure when compiled as debug:
59
- set (CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DCMARK_DEBUG_NODES -DDEBUG" )
60
- set (CMAKE_LINKER_DEBUG "${CMAKE_LINKER_FLAGS_DEBUG} " )
61
-
62
- set (CMAKE_C_FLAGS_PROFILE "${CMAKE_C_FLAGS_RELEASE} -pg" )
63
- set (CMAKE_LINKER_PROFILE "${CMAKE_LINKER_FLAGS_RELEASE} -pg" )
64
-
65
58
if (CMARK_SHARED )
66
59
add_library (${LIBRARY} SHARED ${LIBRARY_SOURCES} )
67
60
target_include_directories (${LIBRARY} PUBLIC
You can’t perform that action at this time.
0 commit comments