Commit 85d7a610 authored by Brad King's avatar Brad King 💬
Browse files

Tests: Use consistent C++ flags FindPackageModeMakefileTest

Rather than using the CXXFLAGS environment variable in the make-only
build, copy the CMAKE_CXX_FLAGS used to build the files on the CMake
side.  This will account for any changes made by CompileFlags.cmake
or cache-provided flags.
parent f23ab1a1
......@@ -4,6 +4,7 @@ include
......@@ -14,7 +15,7 @@ all: pngtest
main.o: clean main.cpp
@foo="`cat $(tmp)`"; \
printf '"%s" %s %s -c main.cpp\n' $(CMAKE_CXX_COMPILER) "$(CXXFLAGS)" "$$foo" >$(tmp)
printf '"%s" %s %s -c main.cpp\n' $(CMAKE_CXX_COMPILER) "$(CMAKE_CXX_FLAGS)" "$$foo" >$(tmp)
@cat $(tmp)
@sh $(tmp)
@rm -f $(tmp)
......@@ -22,7 +23,7 @@ main.o: clean main.cpp
pngtest: main.o
@foo="`cat $(tmp)`"; \
printf '"%s" %s %s -o pngtest main.o %s\n' $(CMAKE_CXX_COMPILER) "$(CXXFLAGS)" "$(LDFLAGS)" "$$foo" >$(tmp)
printf '"%s" %s %s -o pngtest main.o %s\n' $(CMAKE_CXX_COMPILER) "$(CMAKE_CXX_FLAGS)" "$(LDFLAGS)" "$$foo" >$(tmp)
@cat $(tmp)
@sh $(tmp)
@rm -f $(tmp)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment