-- Performing Test HAVE_ISNAN
-- Performing Test HAVE_ISNAN - Success
-- Performing Test HAVE_STD_ISNAN
-- Performing Test HAVE_STD_ISNAN - Success
Source file was:
#include <cmath>
int main() { return isnan(0.0);}
Performing C++ SOURCE FILE Test HAVE_STD_ISNAN succeeded with the following output:
Change Dir: /home/mifi/Software/Sources/fgfs53/next/build/simgear/CMakeFiles/CMakeTmp
Performing C++ SOURCE FILE Test HAVE_ISNAN succeeded with the following output:
Change Dir: /home/mifi/Software/Sources/fgfs53/next/build/simgear/CMakeFiles/CMakeTmp
#include <cmath>
// soundmgr_openal_prviate.hxx -- Implementation details of the soung manager
//
// Sound manager initially written by David Findlay
// <david_j_findlay@yahoo.com.au> 2001
//
// C++-ified by Curtis Olson, started March 2001.
// Modified for the new SoundSystem by Erik Hofman, October 2009
//
// Copyright (C) 2001 Curtis L. Olson - http://www.flightgear.org/~curt
// Copyright (C) 2009 Erik Hofman <erik@ehofman.com>
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License as
// published by the Free Software Foundation; either version 2 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful, but
// WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software Foundation,
// Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
//
// $Id$
#ifndef _SG_SOUNDMGR_OPENAL_PRIVATE_HXX
#define _SG_SOUNDMGR_OPENAL_PRIVATE_HXX 1
#ifdef HAVE_CONFIG_H
# include <simgear_config.h>
#endif
#include <string>
#include <vector>
#include <cmath>
#include <map>
#ifndef _SG_SOUNDMGR_OPENAL_PRIVATE_HXX
#define _SG_SOUNDMGR_OPENAL_PRIVATE_HXX 1
#ifdef HAVE_CONFIG_H
# include <simgear_config.h>
#endif
#include <string>
#include <vector>
#include <map>
#if defined(__APPLE__)
# include <OpenAL/al.h>
# include <OpenAL/alc.h>
#elif defined(OPENALSDK)
# include <al.h>
# include <alc.h>
#else
# include <AL/al.h>
# include <AL/alc.h>
#endif
#include <simgear/structure/SGSharedPtr.hxx>
#include <cmath>
#if defined(HAVE_STD_ISNAN) && !defined(HAVE_ISNAN)
using std::isnan;
#endif
class SGSampleGroup;
/home/mifi/Software/Sources/fgfs53/next/simgear/simgear/sound/soundmgr_openal_private.hxx:76:22: error: ‘isnan’ was not declared in this scope
return (isnan(v[0]) || isnan(v[1]) || isnan(v[2]));
#if defined(HAVE_STD_ISNAN) && !defined(HAVE_ISNAN)
using std::isnan;
#endif
// #if defined(HAVE_STD_ISNAN) && !defined(HAVE_ISNAN)
#if defined(HAVE_STD_ISNAN)
using std::isnan;
#endif
#ifdef HAVE_STD_ISNAN
return std::isnan(v);
#elif defined HAVE_ISNAN
return (isnan(v) != 0);
#else
// Use that every compare involving a NaN returns false
// But be careful, some usual compiler switches like for example
// -fast-math from gcc might optimize that expression to v != v which
// behaves exactly like the opposite ...
return !(v == v);
#endif
// #if defined(HAVE_STD_ISNAN) && !defined(HAVE_ISNAN)
#if defined(HAVE_STD_ISNAN)
using std::isnan;
#endif
check_cxx_source_compiles(
"#include <cmath>
int main() { return std::isnan(0.0);} "
HAVE_STD_ISNAN)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -stdlib=libc++")
check_cxx_source_compiles(
"#include <cmath>
int main() { return std::isnan(0.0);} "
HAVE_STD_ISNAN)
#include <simgear/math/SGMisc.hxx>
#include <simgear/structure/SGSharedPtr.hxx>
inline bool isNaN(float *v) {
return (isnan(v[0]) || isnan(v[1]) || isnan(v[2]));
}
inline bool isNaN(float *v) {
return (SGMisc::isNaN(v[0]) || SGMisc::isNaN(v[1]) || SGMisc::isNaN(v[2]));
}
inline bool isNaN(float *v) {
return (SGMisc<float>::isNaN(v[0]) || SGMisc<float>::isNaN(v[1]) || SGMisc<float>::isNaN(v[2]));
}
#ifdef HAVE_STD_ISNAN
return std::isnan(v);
#elif defined HAVE_ISNAN
return (isnan(v) != 0);
#else
...
#endif
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -stdlib=libc++")
c++: error: unrecognized command line option ‘-stdlib=libc++’
Users browsing this forum: No registered users and 2 guests