Skip to content

Commit

Permalink
Move ucrt rule, add to gitignore
Browse files Browse the repository at this point in the history
  • Loading branch information
andrjohns committed Sep 27, 2023
1 parent 9ee98c9 commit 441415f
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ lib/tbb

# local make include
/make/local
/make/ucrt

# python byte code
*.pyc
Expand Down
19 changes: 10 additions & 9 deletions make/compiler_flags
Original file line number Diff line number Diff line change
Expand Up @@ -121,15 +121,6 @@ CXXFLAGS_LANG ?= -std=c++1y
CXXFLAGS_SUNDIALS ?= -pipe $(CXXFLAGS_OPTIM_SUNDIALS) $(CPPFLAGS_FLTO_SUNDIALS)
#CXXFLAGS_GTEST

make/ucrt:
pound := \#
UCRT_STRING := $(shell echo '$(pound)include <windows.h>' | $(CXX) -E -dM - | findstr _UCRT)
ifneq (,$(UCRT_STRING))
IS_UCRT ?= true
else
IS_UCRT ?= false
endif
$(shell echo "IS_UCRT ?= $(IS_UCRT)" > $(MATH)make/ucrt)

## These are the other compiler flags that can be set.
##
Expand Down Expand Up @@ -170,6 +161,16 @@ ifeq ($(OS),Windows_NT)
CXXFLAGS_OS ?= -m64
endif

make/ucrt:
pound := \#
UCRT_STRING := $(shell echo '$(pound)include <windows.h>' | $(CXX) -E -dM - | findstr _UCRT)
ifneq (,$(UCRT_STRING))
IS_UCRT ?= true
else
IS_UCRT ?= false
endif
$(shell echo "IS_UCRT ?= $(IS_UCRT)" > $(MATH)make/ucrt)

include make/ucrt
ifeq ($(IS_UCRT),true)
CXXFLAGS_OS += -D_UCRT
Expand Down

0 comments on commit 441415f

Please sign in to comment.