mirror of
https://github.com/TREX-CoE/trexio.git
synced 2025-04-29 11:54:45 +02:00
Do not rely on the .git folder for TREXIO_DEVEL setup
This poses issues when packaging for Guix and Debian
This commit is contained in:
parent
3078f825e7
commit
8decb213d3
@ -16,7 +16,7 @@ set(CMAKE_C_STANDARD_REQUIRED ON)
|
|||||||
# Optional configure for developer mode to generate source code from org-mode files.
|
# Optional configure for developer mode to generate source code from org-mode files.
|
||||||
option(TREXIO_DEVEL "TREXIO developer mode (for code generation)." OFF)
|
option(TREXIO_DEVEL "TREXIO developer mode (for code generation)." OFF)
|
||||||
|
|
||||||
if(EXISTS "${CMAKE_SOURCE_DIR}/.git/config")
|
if(EXISTS "${CMAKE_SOURCE_DIR}/.devel")
|
||||||
set(TREXIO_DEVEL ON)
|
set(TREXIO_DEVEL ON)
|
||||||
find_package(Python3 REQUIRED)
|
find_package(Python3 REQUIRED)
|
||||||
if(Python3_FOUND)
|
if(Python3_FOUND)
|
||||||
|
@ -16,11 +16,11 @@ AM_PROG_AR
|
|||||||
LT_PREREQ([2.2])
|
LT_PREREQ([2.2])
|
||||||
LT_INIT
|
LT_INIT
|
||||||
|
|
||||||
# Activate developer mode when the source is the git repository.
|
# Activate developer mode if a dummy file is present (true when cloning the git repository).
|
||||||
# Otherwise, it is the source distribution and the developer mode should not be activated.
|
# Otherwise, it is the source distribution and the developer mode should not be activated.
|
||||||
TEST_IFEXISTS=".git"
|
TEST_IFEXISTS=".devel"
|
||||||
AC_CHECK_FILE([$TEST_IFEXISTS],
|
AS_IF([test -f $TEST_IFEXISTS],
|
||||||
[enable_maintainer_mode="yes"],
|
[enable_maintainer_mode="yes"]
|
||||||
)
|
)
|
||||||
|
|
||||||
VERSION_MAJOR=`echo ${PACKAGE_VERSION} | cut -d. -f1`
|
VERSION_MAJOR=`echo ${PACKAGE_VERSION} | cut -d. -f1`
|
||||||
|
Loading…
x
Reference in New Issue
Block a user