cmake: improve InfiniTime_DIR default
With the old default of just "InfiniTime" you have to have the working directory in the `InfiniSim` directory. The new default makes the default independent of the current working directory.
This commit is contained in:
parent
1b797211f1
commit
a79f75285f
|
@ -1,7 +1,7 @@
|
||||||
message(STATUS "Using CMake version ${CMAKE_VERSION}")
|
message(STATUS "Using CMake version ${CMAKE_VERSION}")
|
||||||
cmake_minimum_required(VERSION 3.10...${CMAKE_VERSION})
|
cmake_minimum_required(VERSION 3.10...${CMAKE_VERSION})
|
||||||
|
|
||||||
SET(InfiniTime_DIR "InfiniTime" CACHE PATH "Path to InfiniTime source path to use for simulator")
|
SET(InfiniTime_DIR "${CMAKE_SOURCE_DIR}/InfiniTime" CACHE PATH "Path to InfiniTime source path to use for simulator")
|
||||||
|
|
||||||
if(NOT EXISTS ${InfiniTime_DIR})
|
if(NOT EXISTS ${InfiniTime_DIR})
|
||||||
message(FATAL_ERROR "Can't access folder '${InfiniTime_DIR}'. Try `git submodule update --init --recursive` to initialize the git submodule of InfiniTime")
|
message(FATAL_ERROR "Can't access folder '${InfiniTime_DIR}'. Try `git submodule update --init --recursive` to initialize the git submodule of InfiniTime")
|
||||||
|
|
Loading…
Reference in New Issue
Block a user