Skip to content

Commit

Permalink
Merge pull request #212 from PJK/cmake_update
Browse files Browse the repository at this point in the history
Updates for CMake 3, CMAKE_MODULE_PATH as subproject
  • Loading branch information
PJK committed Mar 19, 2022
2 parents aacfb14 + f3388f5 commit 2b51572
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ Next
- BREAKING: Improved half-float encoding for denormalized numbers. [[#208]](https://github.com/PJK/libcbor/pull/208) (by [ranvis](https://github.com/ranvis))
- Denormalized half-floats will now preserve data in the mantissa
- Note: Half-float NaNs still lose data (https://github.com/PJK/libcbor/issues/215)
- BUILD BREAKING: Minimum CMake version is 3.0 [[#201]](https://github.com/PJK/libcbor/pull/201) (by [thewtex@](https://github.com/thewtex))
- See https://repology.org/project/cmake/versions for support; the vast majority of users should not be affected.

0.9.0 (2021-11-14)
---------------------
Expand Down
10 changes: 5 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
cmake_minimum_required(VERSION 2.8)
cmake_minimum_required(VERSION 3.0)
project(libcbor)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/CMakeModules/")
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/CMakeModules/")
include(CTest)

SET(CBOR_VERSION_MAJOR "0")
Expand Down Expand Up @@ -139,20 +139,20 @@ else()
message(STATUS "LTO is not enabled")
endif(use_lto)

subdirs(src)
add_subdirectory(src)
if(use_lto)
set_property(DIRECTORY src PROPERTY INTERPROCEDURAL_OPTIMIZATION TRUE)
endif(use_lto)

if (WITH_TESTS)
subdirs(test)
add_subdirectory(test)
if(use_lto)
set_property(DIRECTORY test PROPERTY INTERPROCEDURAL_OPTIMIZATION TRUE)
endif(use_lto)
endif (WITH_TESTS)

if (WITH_EXAMPLES)
subdirs(examples)
add_subdirectory(examples)
if(use_lto)
set_property(DIRECTORY examples PROPERTY INTERPROCEDURAL_OPTIMIZATION TRUE)
endif(use_lto)
Expand Down

0 comments on commit 2b51572

Please sign in to comment.