1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
|
From 81e68584512b21ec572d2561c25a1b19982aa0be Mon Sep 17 00:00:00 2001
From: Alexey Shvetsov <alexxy@omrb.pnpi.spb.ru>
Date: Fri, 1 Dec 2017 17:12:36 +0300
Subject: [PATCH] Fix build with cmake 3.10 on Linux
Without this fix cmake will fail with
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Error at cmake/gmxCTestUtilities.cmake:56 (file):
file STRINGS file
"/var/tmp/portage/sci-chemistry/gromacs-2018_beta1/work/gromacs-2018_beta1_float/DartConfiguration.tcl"
cannot be read.
Call Stack (most recent call first):
CMakeLists.txt:89 (gmx_ctest_init)
-- Performing Test CXXFLAG_STD_CXX0X
-- Performing Test CXXFLAG_STD_CXX0X - Success
-- Performing Test CXX11_SUPPORTED
-- Performing Test CXX11_SUPPORTED - Success
....
....
....
-- Looking for inttypes.h
-- Looking for inttypes.h - found
-- <<< Gentoo configuration >>>
Build type Gentoo
Install path /usr
Compiler flags:
C -march=core-avx2 -O2 -pipe -march=native -mtune=native -mfpmath=sse -mavx2
C++ -march=core-avx2 -O2 -pipe -march=native -mtune=native -mfpmath=sse -mavx2 -std=c++11
Linker flags:
Executable -Wl,-O1 -Wl,--as-needed
Module -Wl,-O1 -Wl,--as-needed
Shared -Wl,-O1 -Wl,--as-needed
-- Configuring incomplete, errors occurred!
See also "/var/tmp/portage/sci-chemistry/gromacs-2018_beta1/work/gromacs-2018_beta1_float/CMakeFiles/CMakeOutput.log".
See also "/var/tmp/portage/sci-chemistry/gromacs-2018_beta1/work/gromacs-2018_beta1_float/CMakeFiles/CMakeError.log".
Change-Id: Ie04c2e5f5884f05c3648fed7289157e73fd8d81f
Signed-off-by: Alexey Shvetsov <alexxy@omrb.pnpi.spb.ru>
---
cmake/gmxCTestUtilities.cmake | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/cmake/gmxCTestUtilities.cmake b/cmake/gmxCTestUtilities.cmake
index 89715f910..3685df648 100644
--- a/cmake/gmxCTestUtilities.cmake
+++ b/cmake/gmxCTestUtilities.cmake
@@ -50,10 +50,12 @@ macro (gmx_ctest_init)
set(MEMORYCHECK_TYPE "AddressSanitizer")
endif()
include(CTest)
- # At least with CMake 3.4.1 on OS X, AddressSanitizer support in CTest
- # does not work without this...
- set(_ctest_config_file "${PROJECT_BINARY_DIR}/DartConfiguration.tcl")
- file(STRINGS ${_ctest_config_file} _existing REGEX "^CMakeCommand: ")
+ if(APPLE)
+ # At least with CMake 3.4.1 on OS X, AddressSanitizer support in CTest
+ # does not work without this...
+ set(_ctest_config_file "${PROJECT_BINARY_DIR}/DartConfiguration.tcl")
+ file(STRINGS ${_ctest_config_file} _existing REGEX "^CMakeCommand: ")
+ endif()
if (NOT _existing)
file(APPEND ${_ctest_config_file} "\nCMakeCommand: ${CMAKE_COMMAND}\n")
endif()
--
2.15.0
|