diff --git a/ThirdParty/iphreeqc/CMakeLists.txt b/ThirdParty/iphreeqc/CMakeLists.txt
index 1d93c6fa96f172df6bc6d53c49205b89d69f2b0e..ec95ca5477ae3e4f6ea78113ac135cc538d6c2bf 100644
--- a/ThirdParty/iphreeqc/CMakeLists.txt
+++ b/ThirdParty/iphreeqc/CMakeLists.txt
@@ -1,4 +1,4 @@
-project(IPhreeqc)
+project(IPhreeqc CXX C)
 set(IPHREEQC_VERSION 3.5.0)
 
 set(SOURCES
@@ -87,6 +87,9 @@ set(SOURCES
     src/src/phreeqcpp/PhreeqcKeywords/Keywords.cpp
 )
 
+# compile Var.c as c++
+SET_SOURCE_FILES_PROPERTIES(src/src/Var.c PROPERTIES LANGUAGE CXX)
+
 add_library(iphreeqc STATIC ${SOURCES})
 target_include_directories(iphreeqc PRIVATE
     ${CMAKE_CURRENT_SOURCE_DIR}/src/src