-
Notifications
You must be signed in to change notification settings - Fork 97
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #72 from darioizzo/master
2.1 tentative
- Loading branch information
Showing
30 changed files
with
1,093 additions
and
418 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
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,46 @@ | ||
set(_PYKEP_REQUIRED_BOOST_LIBS) | ||
list(APPEND _PYKEP_REQUIRED_BOOST_LIBS date_time serialization) | ||
if(_PYKEP_FIND_BOOST_PYTHON) | ||
if(${PYTHON_VERSION_MAJOR} EQUAL 2) | ||
list(APPEND _PYKEP_REQUIRED_BOOST_LIBS python) | ||
else() | ||
list(APPEND _PYKEP_REQUIRED_BOOST_LIBS python3) | ||
endif() | ||
endif() | ||
|
||
message(STATUS "Required Boost libraries: ${_PYKEP_REQUIRED_BOOST_LIBS}") | ||
find_package(Boost 1.55.0 REQUIRED COMPONENTS "${_PYKEP_REQUIRED_BOOST_LIBS}") | ||
if(NOT Boost_FOUND) | ||
message(FATAL_ERROR "Not all requested Boost components were found, exiting.") | ||
endif() | ||
message(STATUS "Detected Boost version: ${Boost_VERSION}") | ||
message(STATUS "Boost include dirs: ${Boost_INCLUDE_DIRS}") | ||
# Might need to recreate targets if they are missing (e.g., older CMake versions). | ||
if(NOT TARGET Boost::boost) | ||
message(STATUS "The 'Boost::boost' target is missing, creating it.") | ||
add_library(Boost::boost INTERFACE IMPORTED) | ||
set_target_properties(Boost::boost PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${Boost_INCLUDE_DIRS}") | ||
endif() | ||
if(NOT TARGET Boost::disable_autolinking) | ||
message(STATUS "The 'Boost::disable_autolinking' target is missing, creating it.") | ||
add_library(Boost::disable_autolinking INTERFACE IMPORTED) | ||
if(WIN32) | ||
set_target_properties(Boost::disable_autolinking PROPERTIES INTERFACE_COMPILE_DEFINITIONS "BOOST_ALL_NO_LIB") | ||
endif() | ||
endif() | ||
foreach(_PYKEP_BOOST_COMPONENT ${_PYKEP_REQUIRED_BOOST_LIBS}) | ||
if(NOT TARGET Boost::${_PYKEP_BOOST_COMPONENT}) | ||
message(STATUS "The 'Boost::${_PYKEP_BOOST_COMPONENT}' imported target is missing, creating it.") | ||
string(TOUPPER ${_PYKEP_BOOST_COMPONENT} _PYKEP_BOOST_UPPER_COMPONENT) | ||
if(Boost_USE_STATIC_LIBS) | ||
add_library(Boost::${_PYKEP_BOOST_COMPONENT} STATIC IMPORTED) | ||
else() | ||
add_library(Boost::${_PYKEP_BOOST_COMPONENT} UNKNOWN IMPORTED) | ||
endif() | ||
set_target_properties(Boost::${_PYKEP_BOOST_COMPONENT} PROPERTIES | ||
INTERFACE_INCLUDE_DIRECTORIES "${Boost_INCLUDE_DIRS}") | ||
set_target_properties(Boost::${_PYKEP_BOOST_COMPONENT} PROPERTIES | ||
IMPORTED_LINK_INTERFACE_LANGUAGES "CXX" | ||
IMPORTED_LOCATION "${Boost_${_PYKEP_BOOST_UPPER_COMPONENT}_LIBRARY}") | ||
endif() | ||
endforeach() |
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,21 @@ | ||
The MIT License (MIT) | ||
|
||
Copyright (c) 2016-2017 Francesco Biscani | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
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,3 @@ | ||
# yacma | ||
|
||
Yet another CMake modules archive. |
Oops, something went wrong.