-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build: upgrade PFL.cmake to v0.5.0-rc.1
To support build with cmake version 3.11.4 Signed-off-by: black-desk <[email protected]>
- Loading branch information
1 parent
7e3c5ea
commit 76ba54a
Showing
7 changed files
with
735 additions
and
648 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
try_compile( | ||
nlohmann_json_FOUND ${CMAKE_CURRENT_BINARY_DIR}/nlohmann_json_compile_test | ||
${CMAKE_CURRENT_LIST_DIR}/nlohmann_json_compile_test.cpp) | ||
|
||
if(NOT nlohmann_json_FOUND) | ||
return() | ||
endif() | ||
|
||
if(NOT TARGET nlohmann_json::nlohmann_json) | ||
add_library(nlohmann_json INTERFACE) | ||
add_library(nlohmann_json::nlohmann_json ALIAS nlohmann_json) | ||
install(TARGETS nlohmann_json EXPORT "${PROJECT_NAME}") | ||
endif() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#include "nlohmann/json.hpp" | ||
|
||
// NOTE: This cpp file is used by Findnlohmann_json.cmake to check | ||
// whether the nlohmann_json library we founded at include directory | ||
// is compatible with 3.5.0 or not. | ||
|
||
#if NLOHMANN_JSON_VERSION_MAJOR != 3 | ||
#error require nlohmann_json compatible with 3.5.0 | ||
#endif | ||
|
||
#if NLOHMANN_JSON_VERSION_MINOR < 5 | ||
#error require nlohmann_json compatible with 3.5.0 | ||
#endif | ||
|
||
int main() | ||
{ | ||
return 0; | ||
} |
Oops, something went wrong.