Skip to content

Commit

Permalink
add compiler & cmake version check
Browse files Browse the repository at this point in the history
  • Loading branch information
TinyTinni committed Nov 28, 2017
1 parent 48d7a32 commit af775dd
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,17 @@ target_include_directories(
INTERFACE $<INSTALL_INTERFACE:include/>
)

target_sources(
${NLOHMANN_JSON_TARGET_NAME}
INTERFACE
$<INSTALL_INTERFACE:include/json.natvis>
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/${NLOHMANN_JSON_SOURCE_DIR}/json.natvis>
)
##
## add debug view defintion file for msvc
##
if (MSVC AND CMAKE_VERSION VERSION_GREATER "3.2.2")
target_sources(
${NLOHMANN_JSON_TARGET_NAME}
INTERFACE
$<INSTALL_INTERFACE:include/json.natvis>
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/${NLOHMANN_JSON_SOURCE_DIR}/json.natvis>
)
endif()

##
## TESTS
Expand Down

0 comments on commit af775dd

Please sign in to comment.