Skip to content

Commit

Permalink
WIP 00
Browse files Browse the repository at this point in the history
  • Loading branch information
hebasto committed May 30, 2024
1 parent 6230d47 commit a791a71
Showing 1 changed file with 62 additions and 0 deletions.
62 changes: 62 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,39 @@ if(POLICY CMP0141)
endif()
cmake_minimum_required(VERSION 3.22)


message("CMAKE_SOURCE_DIR=${CMAKE_SOURCE_DIR}")
message("PROJECT_SOURCE_DIR=${PROJECT_SOURCE_DIR}")


get_cmake_property(_variableNames CACHE_VARIABLES)
list (SORT _variableNames)
foreach (_variableName ${_variableNames})
message(STATUS "${_variableName}=${${_variableName}}")
endforeach()


# return()

if(NOT INTERNAL_BUILD)
file(WRITE ${CMAKE_BINARY_DIR}/internal_build_cache "set(INTERNAL_BUILD ON CACHE BOOL \"\" FORCE)\n")
get_cmake_property(cache_variable_names CACHE_VARIABLES)
foreach (v ${cache_variable_names})
file(APPEND ${CMAKE_BINARY_DIR}/internal_build_cache "set(${v} \"${${v}}\" CACHE STRING \"\" FORCE)\n")
endforeach()

string(RANDOM internal_binary_dir)
execute_process(
COMMAND ${CMAKE_COMMAND} -S ${CMAKE_SOURCE_DIR} -B ${CMAKE_BINARY_DIR}/${internal_binary_dir} -C ${CMAKE_BINARY_DIR}/internal_build_cache
ERROR_VARIABLE error
)
message("=============================================================")
message("${error}")
message("=============================================================")
endif()
return()


#=============================
# Project / Package metadata
#=============================
Expand Down Expand Up @@ -57,6 +90,35 @@ set(CMAKE_CXX_EXTENSIONS OFF)

list(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake/module)



get_cmake_property(_variableNames CACHE_VARIABLES)
list (SORT _variableNames)
foreach (_variableName ${_variableNames})
message(STATUS "${_variableName}=${${_variableName}}")
endforeach()
return()



get_cmake_property(_variableNames CACHE_VARIABLES)
list (SORT _variableNames)
foreach (_variableName ${_variableNames})
message(STATUS "${_variableName}=${${_variableName}}")
endforeach()


return()










#=============================
# Configurable options
#=============================
Expand Down

0 comments on commit a791a71

Please sign in to comment.